Skip to content

Conversation

@donald
Copy link
Member

@donald donald commented Apr 27, 2026

Addresses #148

Deploy with

prun python-3.12.8-0 virtualenv .venv
. .venv/bin/activate
pip install pip_tools
pip-sync requirements/dev.txt
./manage.py migrate
./manage.py update_index
./manage.py collectstatic
./manage.py compilemessages -l de 

Note, that wsgi needs the same python version

@donald donald force-pushed the evolve-requirements branch from d9e303f to 152eb82 Compare April 27, 2026 15:35
@donald
Copy link
Member Author

donald commented Apr 30, 2026

We have one bad page, where body and body_en are empty and body_de has content wich is not JSON but plain HTML:

mpicms=# SELECT page_ptr_id, LEFT(body, 20), LEFT(body_en,20), LEFT(body_de, 20) FROM base_wikipage WHERE body_de IS NOT NULL AND body_de != '' AND body_de NOT LIKE '[%';
 page_ptr_id | left | left |         left         
-------------+------+------+----------------------
          33 | []   | []   | <p>Den Besitzern von
(1 row)

Probably a previous migration from HTML to JSON skipped body_de because of the empty body. Not he invalid json makes the use_json_field=False to use_json_field=True migration fail. The page seems obsolete, it is just a Draft, 6 years old and otherwise empty, I just delete it.

Same with event 5:

mpicms=# SELECT page_ptr_id, body, body_en, body_de FROM events_event WHERE body_de IS NOT NULL AND body_de != '' AND body_de NOT LIKE '[%' LIMIT 1;
 page_ptr_id |                                          body                                          |                                        body_en                                         |                                 body_de                                  
-------------+----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+--------------------------------------------------------------------------
           5 | <p></p><p></p><embed alt="LNdW" embedtype="image" format="left" id="3"/><p></p><p></p> | <p></p><p></p><embed alt="LNdW" embedtype="image" format="left" id="3"/><p></p><p></p> | <p></p><embed alt="LNdW" embedtype="image" format="left" id="3"/><p></p>
(1 row)
mpicms=# UPDATE events_event SET body = '[]', body_de = '[]',  body_en = '[]' WHERE page_ptr_id = 5;

@donald donald force-pushed the evolve-requirements branch 4 times, most recently from 5a3e4e7 to 91497f2 Compare May 7, 2026 20:23
donald added 17 commits May 8, 2026 07:20
Avoid W042 warnings like

base.FeaturedImage: (models.W042) Auto-created primary key used when not
defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the
BaseAppConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
Avoid warning like

base.FormPage: (wagtailsearch.W001) Core Page fields missing in
`search_fields` HINT: Ensure that FormPage extends the Page model search
fields `search_fields = Page.search_fields + [...]`
Note: We should set that to True because that is going to become default
in a later Wagtail version. However, there were migration problems when
going from False to True so we postpone that until other problems are
fixed and we have a runnable stack.
During debugging, we sometimes get a warning, that
intranet.molgen.mpg.de is not in ALLOWED_HOSTS during edit and preview.
Is it unclear why this is required, but allow that for now and
investigate later.
Created by `./manage.py makemigrations`
Switch database field to json. This will be the only option in future
Wagtail versions anyway.
Remove this patch. Hopefully, "settings/local: Add intranet.molgen.mpg.de to
ALLOWED_HOSTS" fixed the same problem.
donald added 16 commits May 8, 2026 07:20
modeladmin is deprecated. Add it as an external package to ease
transition. In the longterm, the usages should be converted to
wagtail.snippets.
Wagtail's add_subpage.html now unpacks a 4-tuple including page_description,
so include model.get_page_description() in the page_types list.
Python 3.12 changed cProfile to use sys.monitoring internally, which
has a limited number of globally-shared tool slots. Concurrent requests
both trying to enable a cProfile.Profile() cause the second one to fail
with "ValueError: Another profiling tool is already active".

See https://github.com/django-commons/django-debug-toolbar/issues/1875
Wagtail 6.0 renames the classnames kwarg to classname.

See RemovedInWagtail60Warning.
Browsers request /favicon.ico unconditionally, causing a 404.
The feature used li.object.stream-field as the styling target, which no
longer exists in the Wagtail 5.x admin. The replacement (section.w-panel)
covers too wide an area and does not look good in the new design.

Keep the flag emoji labels on [de]/[en] fields.
Wagtail 5.x renders translated field headings as
span[data-panel-heading-text] rather than <label>. Use that selector to
append flag emojis after [de]/[en] markers.
wagtail.search.models.Query moved to wagtail.contrib.search_promotions.models in Wagtail 6.
WAGTAIL_USER_EDIT_FORM is deprecated in Wagtail 6 and removed in Wagtail 7.
Replace it with a UserViewSet subclass that overrides get_form_class().
get_user_edit_form was removed from wagtail.users.views.users in Wagtail 6.
Required by Wagtail's database search backend for SearchVectorField.
@donald donald force-pushed the evolve-requirements branch from 91497f2 to 74c6410 Compare May 17, 2026 19:49
We get a lot of warnings which might confuse our editors, disable them
for now.
@donald donald force-pushed the evolve-requirements branch from 35fb7b5 to 31bb387 Compare May 17, 2026 20:35
donald added 6 commits May 17, 2026 22:59
VideoBlock was superseded by VideoChooserBlock from the wagtailvideos
package. It is no longer referenced in live code, only in old migrations.

Replace it with a self-contained stub in each migration file so the
migrations remain importable without the original implementation.
Created by `(cd requirements &&  rm *.txt &&  make)`.
Run

    ./manage.py makemessages -l de

Note: This commit removes many lines from django.po because in the past
the above command was run with the virtual environemnt visible in the
subdirectory "venv0" and walking over the installed Python packages.
This has been changed, the virtual environement is now hidden (".venv")
and makemessages no longer collects messages from python packages, which
is correct.
Wagtail renamed results.html to index_results.html and moved the header
rendering into the generic index view, making the local override redundant.
@donald donald force-pushed the evolve-requirements branch from 81a8b8a to 8dcc43d Compare May 17, 2026 20:59
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant